package com.rew.canteenchefs.daos;

import com.rew.canteenchefs.models.EDishes;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * Dishes - Dao层.
 *
 * Created by HuiWen Ren on 2016/12/5.
 */
@Component
public interface IEDishesDao {

    /**
     * 添加菜品.
     *
     * @return 插入成功条数
     */
    Integer insertDishes(EDishes dishes);
    /**
     * 按 dishName 查询菜品.
     *
     * @param dishName 菜品名称
     * @return 是否存在
     */
    EDishes selectDishes(@Param("dishName") String dishName);
    /**
     * 更新菜品信息.
     *
     * @param dishes 更新实体
     * @return 结果
     */
    Integer updateDishes(EDishes dishes);

    /**
     * 菜品删除.
     *
     * @param dishName 菜品名称
     * @return 删除结果
     */
    Integer deleteDishes(@Param("dishName")String dishName);
}
